﻿/// <summary>
/// Creates a PROJECTILE Collision Entity on awake
/// </summary>
class BowHitboxView : HitBoxBaseView,ICollisionPositionListener
{
    public void OnPosition(CollisionEntity entity, EntitasVec3 value)
    {
        transform.position = value;
    }

    private new void Awake()
    {
        base.Awake();
        Collisionentity.AddCollisionPositionListener(this);
        Collisionentity.AddPosition(transform.position);
        Collisionentity.isProjectile = true;
        Collisionentity.AddSpeed(.1f);
        Collisionentity.AddExpirationTime(10f);
       
    }

    private void OnDestroy()
    {
        if(Collisionentity.hasCollisionPositionListener)
        Collisionentity.RemoveCollisionPositionListener(this, true);
    }


}

